﻿<!--
 Peter
 Created by: Peter Development Team
    http://peter.codeplex.com/
 
 GNU General Public License version 2 (GPLv2)
    http://peter.codeplex.com/license
 
 This code is provided on an AS IS basis, with no WARRANTIES,
  CONDITIONS or GUARANTEES of any kind.
-->
<UserControl x:Class="Peter.View.ViewImageViewer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Logic="clr-namespace:Peter.Logic"
             xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             d:DataContext="{d:DesignInstance Logic:ModelImageViewer}">
   
   <Grid>
      <Grid.ColumnDefinitions>
         <ColumnDefinition Width="*" />
         <ColumnDefinition Width="Auto" />
      </Grid.ColumnDefinitions>

      <Grid Grid.Column="0">
         <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
         </Grid.RowDefinitions>
         <xctk:Zoombox Grid.Row="0"
                       Focusable="False"
                       IsTabStop="False"
                       DragModifiers="None"
                       ZoomModifiers="None"
                       ViewStackMode="Disabled">
            <Image Source="{Binding Path=Image}" />
         </xctk:Zoombox>
         <TextBlock Text="{Binding Path=FileInfo.FullName}"
                    Grid.Row="1"/>
      </Grid>

      <Expander Grid.Column="1"
                IsExpanded="True"
                ExpandDirection="Right">
         <Expander.Header>
            <TextBlock Text="Image Attributes"
                       RenderTransformOrigin="0.5,0.5"
                       Margin="0,0,0,0"
                       Width="Auto">
            <TextBlock.LayoutTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="1"
                                    ScaleY="1" />
                    <SkewTransform AngleX="0"
                                   AngleY="0" />
                    <RotateTransform Angle="90" />
                    <TranslateTransform X="0"
                                        Y="0" />
                </TransformGroup>
            </TextBlock.LayoutTransform>
            <TextBlock.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="1"
                                    ScaleY="1" />
                    <SkewTransform AngleX="0"
                                   AngleY="0" />
                    <RotateTransform Angle="0" />
                    <TranslateTransform X="0"
                                        Y="0" />
                </TransformGroup>
            </TextBlock.RenderTransform>
            </TextBlock>
         </Expander.Header>
         <Grid>
            <Grid.RowDefinitions>
               <RowDefinition Height="Auto" />
               <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <ScrollViewer VerticalScrollBarVisibility="Auto"
                          HorizontalScrollBarVisibility="Disabled"
                          Grid.Row="0">
               <StackPanel>
                  <TextBlock FontWeight="Bold">Size:</TextBlock>
                  <TextBlock>
                  <TextBlock.Text>
                     <MultiBinding StringFormat="{}{0} x {1}">
                        <Binding Path="Width" />
                        <Binding Path="Height" />
                     </MultiBinding>
                  </TextBlock.Text>
                  </TextBlock>
                  <TextBlock FontWeight="Bold">Date Image Taken:</TextBlock>
                  <TextBlock Text="{Binding Path=DateImageTaken}" />
                  <TextBlock FontWeight="Bold">Camera Model:</TextBlock>
                  <TextBlock Text="{Binding Path=CameraModel}" />
                  <TextBlock FontWeight="Bold">Creation Software:</TextBlock>
                  <TextBlock Text="{Binding Path=CreationSoftware}" />
                  <!--<TextBlock FontWeight="Bold">Lens Aperture:</TextBlock>
               <TextBlock Text="{Binding Path=LensAperture, Converter={StaticResource LensApertureConverterReference}}" />
               <TextBlock FontWeight="Bold">Focal Length:</TextBlock>
               <TextBlock Text="{Binding Path=FocalLength, Converter={StaticResource FocalLengthConverterReference}}" />-->
                  <TextBlock FontWeight="Bold">ISO Speed:</TextBlock>
                  <TextBlock Text="{Binding Path=IsoSpeed}" />
               <!--<TextBlock FontWeight="Bold">Exposure Time:</TextBlock>
               <TextBlock Text="{Binding Path=ExposureTime, Converter={StaticResource ExposureTimeConverterReference}}" />
               <TextBlock FontWeight="Bold">Exposure Mode:</TextBlock>
               <TextBlock Text="{Binding Path=ExposureMode, Converter={StaticResource ExposureModeConverterReference}}" />-->
                  <TextBlock FontWeight="Bold">Exposure Compensation:</TextBlock>
                  <TextBlock Text="{Binding Path=ExposureCompensation}" />
                  <TextBlock FontWeight="Bold">White Balance Mode:</TextBlock>
                  <TextBlock Text="{Binding Path=WhiteBalanceMode}" />
                  <TextBlock FontWeight="Bold">Color Representation:</TextBlock>
                  <TextBlock Text="{Binding Path=ColorRepresentation}" />
               </StackPanel>
            </ScrollViewer>
            <StackPanel Orientation="Horizontal"
                        Grid.Row="1">
               <TextBlock Margin="5"
                          TextWrapping="Wrap"
                          FontSize="10"
                          Text="*Tip: You can zoom and pan the&#x0a;image by using your mouse" />
            </StackPanel>
         </Grid>
      </Expander>
   </Grid>
</UserControl>
